import React, { Suspense } from 'react';
import { Provider } from 'react-redux';
import { renderRoutes } from 'react-router-config';
import { HashRouter } from 'react-router-dom';
import { IconStyle } from '@/assets/iconfont/iconfont';
import { GlobalStyle } from '@/assets/style';
import routes from '@/routes';
import store from '@/store';
import { CategoryAlphaProvider } from '@/application/Singers/data';
function App() {
  return (
    <Provider store={store}>
      <HashRouter>
        <GlobalStyle></GlobalStyle>
        <IconStyle></IconStyle>
        <Suspense fallback={<h2>组件加载中</h2>}>
          <CategoryAlphaProvider>{renderRoutes(routes)}</CategoryAlphaProvider>
        </Suspense>
      </HashRouter>
    </Provider>
  );
}

export default App;
